﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MyOA.DAL;
using MyOA.Model;

namespace MyOA.BLL
{
   public class MessageToUserManager
    {
       MessageToUserService messageToUserService = new MessageToUserService();
       /// <summary>
        /// 根据messageId、toUserId修改MessageToUser
       /// </summary>
       /// <param name="messageToUser"></param>
       /// <returns>修改结果1或0</returns>
       public int updateMessageToUserByMessageIdAndToUserId(MessageToUser messageToUser)
       {
           return messageToUserService.updateMessageToUserByMessageIdAndToUserId(messageToUser);
       }
       /// <summary>
        /// 根据messageId、toUserId查找MessageToUser
        /// </summary>
        /// <param name="toUserId">用户Id</param>
        /// <param name="messageId">信息Id</param>
        /// <returns>查找到的信息</returns>
       public MessageToUser getMessageToUserByMessageIdAndToUserId(int toUserId, int messageId)
       {
           return messageToUserService.getMessageToUserByMessageIdAndToUserId(toUserId,messageId);
       }
        /// <summary>
        /// 根据messageId、toUserId删除MessageToUser
        /// </summary>
        /// <param name="toUserId">用户Id</param>
        /// <param name="messageId">信息Id</param>
       /// <returns>删除结果1或0</returns>
       public int deleteMessageByMessageIdAndToUserId(int toUserId, int messageId)
       {
           return messageToUserService.deleteMessageByMessageIdAndToUserId(toUserId,messageId);
       }
       /// <summary>
        /// 根据messageId删除MessageToUser
        /// </summary>
        /// <param name="messageId">要删除的messageId</param>
        /// <returns>删除结果1或0</returns>
       public int deleteMessageToUserByMessageId(int messageId)
       {
           return messageToUserService.deleteMessageToUserByMessageId(messageId);
       }
       /// <summary>
        /// 向表MessageToUser中插入新信息
        /// </summary>
        /// <param name="messageToUser"></param>
        /// <returns>插入结果1或0</returns>
       public int insertMessageToUser(MessageToUser messageToUser)
       {
           return messageToUserService.insertMessageToUser(messageToUser);
       }
       /// <summary>
        /// 根据messageId查找MessageToUser
        /// </summary>
        /// <param name="messageId">要查找的信息Id</param>
        /// <returns></returns>
       public MessageToUser GetMessageToUserByMessageId(int messageId)
       {
           return messageToUserService.GetMessageToUserByMessageId(messageId);
       }
       /// <summary>
        /// 根据messageId查找所有MessageToUser
        /// </summary>
        /// <param name="messageId">要查找的信息Id</param>
        /// <returns>返回MessageToUser集合</returns>
       public IList<MessageToUser> getAllMessageToUserByMessageId(int messageId)
       {
           return messageToUserService.getAllMessageToUserByMessageId(messageId);
       }
    }
}
